package dao;

import pojo.MyOrder;

import java.util.List;

public interface IMyOrderDao {
    /**
     * mazai
     *
     */
    void addMyOrder(MyOrder myOrder);
    void updateMyOrder(MyOrder myOrder);
    void deleteMyOrder(int id);

    /**
     * 返回当前数据库的所有订单
     * @return
     */
    List<MyOrder> findAll();

    /**
     * 返回当前账户下所有的订单
     * @param userid
     * @return
     */
    List<MyOrder> findByUserNameOrId(int userid);

    /**
     * 根据订单id查找返回订单
     * @param id 订单id
     * @return
     */
    MyOrder findById(int id);
}
